home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / exec / funatol.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  645 b   |  29 lines

  1. /*
  2. \funcref{fun\_atol}{void fun\_atol ()}
  3.     {}
  4.     {}
  5.     {addtolist(), discard(), newvar()}
  6.     {fun\_atoi(), etc.}
  7.     {funatol.c}
  8.     {
  9.         This function converts the last pushed variable, which is assumed to
  10.         hold a string, to a list of one element. The string variable is
  11.         discarded after use. The formed list, containing one element, is copied
  12.         onto the stack to the former position of the string variable.
  13.     }
  14. */
  15.  
  16. #include "icm-exec.h"
  17.  
  18. void fun_atol ()
  19. {
  20.     VAR_
  21.         tmp;
  22.  
  23.     tmp = newvar (e_list);
  24.     tmp = addtolist (tmp, stack [sp].vu.i->ls.str);
  25.  
  26.     discard (stack [sp]);
  27.     stack [sp] = tmp;
  28. }
  29.